Optimal. Leaf size=103 \[ \frac {(2+2 i) a^{3/2} \tanh ^{-1}\left (\frac {(1+i) \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right ) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}}{d}-\frac {2 a \sqrt {\cot (c+d x)} \sqrt {a+i a \tan (c+d x)}}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.14, antiderivative size = 103, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {4326, 3626,
3625, 211} \begin {gather*} \frac {(2+2 i) a^{3/2} \sqrt {\tan (c+d x)} \sqrt {\cot (c+d x)} \tanh ^{-1}\left (\frac {(1+i) \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{d}-\frac {2 a \sqrt {\cot (c+d x)} \sqrt {a+i a \tan (c+d x)}}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 211
Rule 3625
Rule 3626
Rule 4326
Rubi steps
\begin {align*} \int \cot ^{\frac {3}{2}}(c+d x) (a+i a \tan (c+d x))^{3/2} \, dx &=\left (\sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}\right ) \int \frac {(a+i a \tan (c+d x))^{3/2}}{\tan ^{\frac {3}{2}}(c+d x)} \, dx\\ &=-\frac {2 a \sqrt {\cot (c+d x)} \sqrt {a+i a \tan (c+d x)}}{d}+\left (2 i a \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}\right ) \int \frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {\tan (c+d x)}} \, dx\\ &=-\frac {2 a \sqrt {\cot (c+d x)} \sqrt {a+i a \tan (c+d x)}}{d}+\frac {\left (4 a^3 \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}\right ) \text {Subst}\left (\int \frac {1}{-i a-2 a^2 x^2} \, dx,x,\frac {\sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{d}\\ &=\frac {(2+2 i) a^{3/2} \tanh ^{-1}\left (\frac {(1+i) \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right ) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}}{d}-\frac {2 a \sqrt {\cot (c+d x)} \sqrt {a+i a \tan (c+d x)}}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.40, size = 105, normalized size = 1.02 \begin {gather*} -\frac {2 a e^{-i (c+d x)} \left (e^{i (c+d x)}-\sqrt {-1+e^{2 i (c+d x)}} \tanh ^{-1}\left (\frac {e^{i (c+d x)}}{\sqrt {-1+e^{2 i (c+d x)}}}\right )\right ) \sqrt {\cot (c+d x)} \sqrt {a+i a \tan (c+d x)}}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 574 vs. \(2 (85 ) = 170\).
time = 45.72, size = 575, normalized size = 5.58
method | result | size |
default | \(-\frac {\left (2 i \sin \left (d x +c \right ) \arctan \left (\sqrt {\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}}\, \sqrt {2}+1\right ) \sqrt {\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}}+2 i \sin \left (d x +c \right ) \arctan \left (\sqrt {\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}}\, \sqrt {2}-1\right ) \sqrt {\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}}+i \sin \left (d x +c \right ) \ln \left (-\frac {\sqrt {\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}}\, \sqrt {2}\, \sin \left (d x +c \right )-\sin \left (d x +c \right )-\cos \left (d x +c \right )+1}{\sqrt {\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}}\, \sqrt {2}\, \sin \left (d x +c \right )+\sin \left (d x +c \right )+\cos \left (d x +c \right )-1}\right ) \sqrt {\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}}-2 \sin \left (d x +c \right ) \arctan \left (\sqrt {\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}}\, \sqrt {2}+1\right ) \sqrt {\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}}-2 \sin \left (d x +c \right ) \arctan \left (\sqrt {\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}}\, \sqrt {2}-1\right ) \sqrt {\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}}-\sin \left (d x +c \right ) \ln \left (-\frac {\sqrt {\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}}\, \sqrt {2}\, \sin \left (d x +c \right )+\sin \left (d x +c \right )+\cos \left (d x +c \right )-1}{\sqrt {\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}}\, \sqrt {2}\, \sin \left (d x +c \right )-\sin \left (d x +c \right )-\cos \left (d x +c \right )+1}\right ) \sqrt {\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}}+i \sin \left (d x +c \right ) \sqrt {2}+\cos \left (d x +c \right ) \sqrt {2}-\sqrt {2}\right ) \sin \left (d x +c \right ) \left (\frac {\cos \left (d x +c \right )}{\sin \left (d x +c \right )}\right )^{\frac {3}{2}} \sqrt {\frac {a \left (i \sin \left (d x +c \right )+\cos \left (d x +c \right )\right )}{\cos \left (d x +c \right )}}\, \sqrt {2}\, a}{d \left (i \sin \left (d x +c \right )+\cos \left (d x +c \right )-1\right ) \cos \left (d x +c \right )}\) | \(575\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Both result and optimal contain complex but leaf count of result is larger than
twice the leaf count of optimal. 545 vs. \(2 (79) = 158\).
time = 0.60, size = 545, normalized size = 5.29 \begin {gather*} \frac {{\left (\left (2 i - 2\right ) \, a \arctan \left (2 \, {\left (\cos \left (2 \, d x + 2 \, c\right )^{2} + \sin \left (2 \, d x + 2 \, c\right )^{2} - 2 \, \cos \left (2 \, d x + 2 \, c\right ) + 1\right )}^{\frac {1}{4}} \sin \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right ) - 1\right )\right ) + 2 \, \sin \left (d x + c\right ), 2 \, {\left (\cos \left (2 \, d x + 2 \, c\right )^{2} + \sin \left (2 \, d x + 2 \, c\right )^{2} - 2 \, \cos \left (2 \, d x + 2 \, c\right ) + 1\right )}^{\frac {1}{4}} \cos \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right ) - 1\right )\right ) + 2 \, \cos \left (d x + c\right )\right ) + \left (i + 1\right ) \, a \log \left (4 \, \cos \left (d x + c\right )^{2} + 4 \, \sin \left (d x + c\right )^{2} + 4 \, \sqrt {\cos \left (2 \, d x + 2 \, c\right )^{2} + \sin \left (2 \, d x + 2 \, c\right )^{2} - 2 \, \cos \left (2 \, d x + 2 \, c\right ) + 1} {\left (\cos \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right ) - 1\right )\right )^{2} + \sin \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right ) - 1\right )\right )^{2}\right )} + 8 \, {\left (\cos \left (2 \, d x + 2 \, c\right )^{2} + \sin \left (2 \, d x + 2 \, c\right )^{2} - 2 \, \cos \left (2 \, d x + 2 \, c\right ) + 1\right )}^{\frac {1}{4}} {\left (\cos \left (d x + c\right ) \cos \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right ) - 1\right )\right ) + \sin \left (d x + c\right ) \sin \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right ) - 1\right )\right )\right )}\right )\right )} {\left (\cos \left (2 \, d x + 2 \, c\right )^{2} + \sin \left (2 \, d x + 2 \, c\right )^{2} - 2 \, \cos \left (2 \, d x + 2 \, c\right ) + 1\right )}^{\frac {1}{4}} \sqrt {a} - 2 \, {\left ({\left (\left (i + 1\right ) \, a \cos \left (d x + c\right ) + \left (i - 1\right ) \, a \sin \left (d x + c\right )\right )} \cos \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right ) - 1\right )\right ) + {\left (-\left (i - 1\right ) \, a \cos \left (d x + c\right ) + \left (i + 1\right ) \, a \sin \left (d x + c\right )\right )} \sin \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right ) - 1\right )\right )\right )} \sqrt {a}}{{\left (\cos \left (2 \, d x + 2 \, c\right )^{2} + \sin \left (2 \, d x + 2 \, c\right )^{2} - 2 \, \cos \left (2 \, d x + 2 \, c\right ) + 1\right )}^{\frac {1}{4}} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 302 vs. \(2 (79) = 158\).
time = 0.79, size = 302, normalized size = 2.93 \begin {gather*} -\frac {8 \, \sqrt {2} a \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}} e^{\left (i \, d x + i \, c\right )} - \sqrt {\frac {32 i \, a^{3}}{d^{2}}} d \log \left (\frac {{\left (\sqrt {2} {\left (d e^{\left (2 i \, d x + 2 i \, c\right )} - d\right )} \sqrt {\frac {32 i \, a^{3}}{d^{2}}} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}} + 8 i \, a^{2} e^{\left (i \, d x + i \, c\right )}\right )} e^{\left (-i \, d x - i \, c\right )}}{2 \, a}\right ) + \sqrt {\frac {32 i \, a^{3}}{d^{2}}} d \log \left (-\frac {{\left (\sqrt {2} {\left (d e^{\left (2 i \, d x + 2 i \, c\right )} - d\right )} \sqrt {\frac {32 i \, a^{3}}{d^{2}}} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}} - 8 i \, a^{2} e^{\left (i \, d x + i \, c\right )}\right )} e^{\left (-i \, d x - i \, c\right )}}{2 \, a}\right )}{4 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\mathrm {cot}\left (c+d\,x\right )}^{3/2}\,{\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^{3/2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________